package com.zhijian.medical.service;


import com.zhijian.medical.entity.po.AssessmentDetail;
import com.zhijian.medical.entity.vo.request.AssessmentDetailSearchVo;
import com.zhijian.medical.entity.vo.response.AssessmentDetailVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 考核-题目明细表 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2023-02-15 15:34:47
 */
public interface AssessmentDetailService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    AssessmentDetail selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    AssessmentDetailVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 根据考核id进行删除
     *
     * @param assessmentId
     */
    void deleteByAssessmentId(Long assessmentId);

    /**
     * 新增
     *
     * @param assessmentDetail
     * @return
     */
    Long insert(AssessmentDetail assessmentDetail);

    /**
     * 更改
     *
     * @param assessmentDetail
     * @return
     */
    boolean update(AssessmentDetail assessmentDetail);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(AssessmentDetail record);

    /**
     * 总数
     *
     * @param assessmentDetailSearchVo
     * @return
     */
    Integer count(AssessmentDetailSearchVo assessmentDetailSearchVo);

    /**
     * 列表
     *
     * @param assessmentDetailSearchVo
     * @return
     */
    List<AssessmentDetailVo> selectList(AssessmentDetailSearchVo assessmentDetailSearchVo);

    /**
     * 分页查询
     *
     * @param assessmentDetailSearchVo
     * @return
     */
    Page<AssessmentDetailVo> selectPage(AssessmentDetailSearchVo assessmentDetailSearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<AssessmentDetail> entities);

    /**
     * 根据考核id查询
     *
     * @param assessmentId
     * @return
     */
    AssessmentDetailVo selectByAssessmentId(Long assessmentId);
}